package org.leo.dm.common.exception;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * 
 * Created on 2015年12月18日
 * <p>
 * Description 异常获取
 * <p>
 * Copyright neusoft (c) 2015 .
 * 
 * @author xiao_h
 *
 */
public class DpExceptionTracker {
	public static final int STRING_BUFFER = 1024;

	public static String trace(Exception e) {
		StringWriter sw = new StringWriter(STRING_BUFFER);
		PrintWriter pw = new PrintWriter(sw);
		e.printStackTrace(pw);
		return sw.toString();
	}
}
